<?php


namespace Admin\Model;
use Think\Model;
use Common\Common\ConstantUtil;


class RoleModel extends Model {
    protected $tableName = 'modules';



    public function deleteRole($id) {
        $model = new Model ();
        $model->startTrans();
        $model->table("role")->where(["id"=>$id])->delete();
        $model->table("role_relation")->where(["role_id"=>$id])->delete();
        $model->table("role_user")->where(["role_id"=>$id])->delete();
        $model->commit();
        return true;
    }



}
